<template>
    <div> 
        <MovieItem v-for="item in list" :movie="item" :key="item.filmId">
            <button>预定</button>
        </MovieItem>
 </div>
</template>

<script>
import MovieItem from "@/components/MovieItem"
export default {
    data() {
        return  {
           list:[]
        }
    },
    mounted() {
         this.loadData()
    },
    components:{
        MovieItem
    },
    methods:{
        async loadData() {
           const result = await this.$http.get("/gateway?cityId=440300&pageNum=1&pageSize=10&type=2&k=7828219",{
                headers:{
                    "X-Client-Info":'{"a":"3000","ch":"1002","v":"5.2.1","e":"1706499812185314953920513"}',
                    "X-Host":"mall.film-ticket.film.list"
                }
            })
            this.list = result.data.films
            console.log(  this.list);


        }
    }
};
</script>

<style>

</style>
